<template>
  <div id="app">
    <el-container>
      <el-menu style="margin-right:10px;">
        <el-menu-item index="1" @click="handleClick" goto="LogType">日志类型管理</el-menu-item>
        <el-menu-item index="2" @click="handleClick" goto="RecentLog">近期日志查询</el-menu-item>
        <el-menu-item index="3" @click="handleClick" goto="AllLog" isSimple="0">详细日志下载</el-menu-item>
        <el-menu-item index="4" @click="handleClick" goto="AllLog" isSimple="1">简单日志下载</el-menu-item>
        <el-menu-item index="5" @click="handleClick" goto="TriggerManager">触发器日志管理</el-menu-item>
        <el-menu-item index="6" @click="handleClick" goto="TriggerQuery">触发器日志查询</el-menu-item>
      </el-menu>
      <el-main>
        <router-view />
      </el-main>
    </el-container>
  </div>
</template>
<script>
  export default {
    name: 'App',
    methods: {
      handleClick(v) {
        var goto = v.$el.getAttribute("goto");
        if (goto === "AllLog") {
          this.$router.push({ name: goto, params: { isSimple: v.$el.getAttribute("isSimple") } });
        }
        else {
          this.$router.push({ name: goto });
        }
      }
    }
  }
</script>
<style>
</style>
